﻿using System;
using Plain;
using System.Collections.Generic;
using Plain.Validation;

namespace Plain.Demo.Blog {
    public class BlogEntry : BusinessEntity<int> {
        
        [NotNullOrEmpty]
        public string Title { get; set; }
        
        [NotNullOrEmpty]
        public string Content { get; set; }

        [NotNullOrEmpty]
        public string Author { get; set; }
        
        [NotNullOrEmpty]
        public DateTime Created { get; set; }

        [CollectionSize(Max = 10)]
        public IList<Comment> Comments { get; set; }
    }
}
